package gspushmq.v1.app.subscribeapp.config;

import com.aliyuncs.DefaultAcsClient;
import com.aliyuncs.profile.DefaultProfile;

import ggframework.util.GGConfigurer;

/**
 * @Description 阿里云客户端对象
 * @Author 成尚佳
 * @Date 2018/12/18 17:27
 * @Version 1.0
 * @company 上海朝阳永续信息技术有限公司
 * @copyright (c) 2015 SunTime Co'Ltd Inc. All rights reserved.
 **/
public class Client {

    private static DefaultAcsClient defaultAcsClient;

    public static DefaultAcsClient getInstance(){
        if (defaultAcsClient == null) {
            defaultAcsClient = new DefaultAcsClient(
                    DefaultProfile.getProfile(GGConfigurer.get("ALIYUN.REGION_ID")
                            , GGConfigurer.get("ALIYUN.ACCESS_KEY_ID")
                                    , GGConfigurer.get("ALIYUN.ACCESS_KEY_SECRET")));
        }
            return defaultAcsClient;
    }

}
